function showInfo(event, categoryId) {
    console.log("showInfo called with categoryId: " + categoryId);
    var floatWindow = document.getElementById("floatWindow");
    floatWindow.style.left = event.pageX + 10 + "px";
    floatWindow.style.top = event.pageY + 10 + "px";
    floatWindow.style.display = "block";

    var xhr = new XMLHttpRequest();
    xhr.open("GET", "getCategoryInfo?categoryId=" + categoryId, true);
    xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
            floatWindow.innerHTML = xhr.responseText; // 将返回的内容放在浮动窗口
        }
    };
    xhr.send();
}

function hideInfo() {
    var floatWindow = document.getElementById("floatWindow");
    floatWindow.style.display = "none"; // 隐藏浮动窗口
    floatWindow.innerHTML = "Loading..."; // 重置内容
}